package ae.pcfc.etks.online.itworx.ehs.web.common.exception.helper;

import ae.pcfc.etks.online.itworx.ehs.web.common.exception.BaseException;
import ae.pcfc.etks.online.itworx.ehs.web.common.exception.handler.BaseExceptionHandler;

/**
 * helper class for handling exception
 * 
 * @author Ahmed.Mostafa
 * 
 */
public class ExceptionHandlerHelper{
	
	private static BaseExceptionHandler ehsExpHandler;
	
	public void setEhsExpHandler(BaseExceptionHandler ehsExpHandler) {
		ExceptionHandlerHelper.ehsExpHandler = ehsExpHandler;
	}
	
	/**
	 * static helper method for handling the exception logging
	 * 
	 * @param exp
	 */
	public static void handleException(BaseException exp) {
		ehsExpHandler.handleException(exp);
	}
}
